Skip to content

[Common,PWGCF] EventPlaneHelper: avoid copying FT0 Geometry on every call#16444

Open
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr16444
Open

[Common,PWGCF] EventPlaneHelper: avoid copying FT0 Geometry on every call#16444
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr16444

Conversation

@ktf
Copy link
Copy Markdown
Member

@ktf ktf commented May 29, 2026

GetPhiFT0 and SumQvectors took o2::ft0::Geometry by value,
causing a full copy (TObject heap allocation + destruction) on
every invocation. SumQvectors is called ~208 times per event,
so this was ~14% of CPU in Q-vector trains.

Additionally, calculateChannelCenter() was called inside
GetPhiFT0 on every channel, recomputing all 208 channel
positions from scratch each time despite the geometry being
constant.

Fix:

  • Pass ft0::Geometry by const reference
  • Call calculateChannelCenter() once at init time
  • Remove the per-call calculateChannelCenter() from GetPhiFT0

GetPhiFT0 and SumQvectors took o2::ft0::Geometry by value,
causing a full copy (TObject heap allocation + destruction) on
every invocation. SumQvectors is called ~208 times per event,
so this was ~14% of CPU in Q-vector trains.

Additionally, calculateChannelCenter() was called inside
GetPhiFT0 on every channel, recomputing all 208 channel
positions from scratch each time despite the geometry being
constant.

Fix:
- Pass ft0::Geometry by const reference
- Call calculateChannelCenter() once at init time
- Remove the per-call calculateChannelCenter() from GetPhiFT0
@github-actions
Copy link
Copy Markdown

O2 linter results: ❌ 13 errors, ⚠️ 46 warnings, 🔕 0 disabled

@github-actions github-actions Bot changed the title EventPlaneHelper: avoid copying FT0 Geometry on every call [Common,PWGCF] EventPlaneHelper: avoid copying FT0 Geometry on every call May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant